import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
} from 'typeorm';

@Entity('tb_email', {
  comment: '邮件表',
})
export class Email {
  @PrimaryGeneratedColumn('increment', { comment: '自增主键', unsigned: true })
  id: number;

  @Column({ comment: '发件邮箱' })
  sender: string;

  @Column({ comment: '收件邮箱' })
  receiver: string;

  @Column({ comment: '邮件主题' })
  subject: string;

  @Column({ comment: '邮件内容' })
  content: string;

  @Column({ comment: '邮件状态' })
  status: string;

  @CreateDateColumn({ comment: '发件时间' })
  time: Date;
}
